import axios from 'axios'

let serviceMock = axios.create({
  baseURL: '/mock',
  timeout: 6000,
})

serviceMock.interceptors.request.use((config) => {
  return config
})

serviceMock.interceptors.response.use((res) => {
  return res.data.data
}, (err) => {
  return Promise.reject(err)
})

export default serviceMock